<?php
include_once("config.php");
if (isset($_SESSION['adminName'])){
	$isAdmin=true;
}else{
	$isAdmin=false;
}
?>

<!DOCTYPE html>
<html>
<head>
	<title>Index | Admin</title>
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<link rel="stylesheet" type="text/css" href="//netdna.bootstrapcdn.com/bootstrap/3.0.2/css/bootstrap.min.css">
	<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
	<script type="text/javascript" src="//netdna.bootstrapcdn.com/bootstrap/3.0.2/js/bootstrap.min.js"></script>
</head>
<body>
<?php
if (!$isAdmin){
?>
	<div class="container">
  	<nav class="navbar navbar-inverse" role="navigation">
		  <!-- Brand and toggle get grouped for better mobile display -->
		  <div class="navbar-header">
		    <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar-collapse-1">
		    </button>
		    <a class="navbar-brand" href="adminIndex.php">Admin Index</a>
		  </div>

		  <!-- Collect the nav links, forms, and other content for toggling -->
		  <div class="collapse navbar-collapse" id="navbar-collapse-1">
		    <ul class="nav navbar-nav">
		    </ul>
		    <ul class="nav navbar-nav navbar-right">
          <li><a href="adminLogin.php">Login</a></li>
		    </ul>
		  </div><!-- /.navbar-collapse -->
		</nav>
		You can login <a href="adminLogin.php">here</a>
  </div>
<?php
}else{
?>
  <div class="container">
  	<nav class="navbar navbar-inverse" role="navigation">
		  <!-- Brand and toggle get grouped for better mobile display -->
		  <div class="navbar-header">
		    <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar-collapse-1">
		      <span class="icon-bar"></span>
		      <span class="icon-bar"></span>
		      <span class="icon-bar"></span>
		      <span class="icon-bar"></span>
		    </button>
		    <a class="navbar-brand" href="adminIndex.php">Admin Index</a>
		  </div>

		  <!-- Collect the nav links, forms, and other content for toggling -->
		  <div class="collapse navbar-collapse" id="navbar-collapse-1">
		    <ul class="nav navbar-nav">
		      <li><a href="viewuser.php">User</a></li>
		      <li><a href="viewrestuarant.php">Restuarant</a></li>
		      <li><a href="viewdish.php">Dish</a></li>
		      <li><a href="vieworder.php">Order</a></li>
		    </ul>
		    <ul class="nav navbar-nav navbar-right">
          <li><a href="adminLogout.php">Logout</a></li>
		    </ul>
		  </div><!-- /.navbar-collapse -->
		</nav>
		You can start working on admin site.
  </div>
<?php
}
?>
</body>
</html>
